package com.yao.component.pictureselector;

import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.view.View;

import java.util.List;

/**
 * Created by zwj on 2016/1/20.
 */
public class MainActivity extends Activity{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_activity);
        if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){
            Log.e("zwj","...........sdcard=true");
            Log.e("zwj","...........sdcard="+Environment.getExternalStorageDirectory());
        }else {
            Log.e("zwj","...........sdcard=false");
        }
    }
    public void onShow(View v){
        MediaSelector selector=new MediaSelector(this, new MediaSelector.onPictureSelectListener() {
            @Override
            public void onSelect(List<String> selectPath) {
                Log.e("zwj","...........selectPath="+selectPath.size());
            }

            @Override
            public void onCancel() {
                Log.e("zwj","...........cancel");
            }
        });
        selector.show();
    }
}
